<!--
 * @Description: 
 * @Author: mxy
 * @Date: 2022-11-27 21:26:33
 * @LastEditors: mxy
 * @LastEditTime: 2022-11-27 21:26:33
-->
<!--
 * @Description: 
 * @Author: mxy
 * @Date: 2022-11-27 20:37:20
 * @LastEditors: mxy
 * @LastEditTime: 2022-11-27 21:25:01
-->
<template>
  <div>
    <h2>双向绑定</h2>
    <!-- v-model其实就是表单的value值 -->
    <input type="text" :value="val" @input="val = $event.target.value" />
    <!-- <input type="text" v-model="val" /> -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      val: "123",
    };
  },
};
</script>

<style>
h2 {
  color: red;
}
</style>
